import {Injectable} from '@angular/core';
import {OriginalData} from "./original-data";
import {Observable} from "rxjs";
import {MsgResult} from "../../../models/msg-result";
import {RequestUtil} from "../../../util/request-util";
import {API} from "../../../constants/constants";

@Injectable()
export class OriginalDataService {

  constructor(private requestUtil: RequestUtil) {
  }


  findScCollectDataList(origin: OriginalData): Observable<MsgResult> {
    let params = "snCodes=" + origin.snCodes + "&startTime=" + origin.startTime
      + "&endTime=" + origin.endTime + "&monitorCode=" + origin.monitorCode;
    return this.requestUtil.get(API.findScCollectDataList, params);
  }


}
